//
//  main.m
//  Block1
//
//  Created by liy on 2024/12/19.
//

#import <Foundation/Foundation.h>

int main(int argc, const char *argv[]) {
  @autoreleasepool {
    int (^ mathBlock) (int, int);

    mathBlock = ^int (int a, int b) {
      return a + b;
    };
    int result1 = mathBlock(2, 3);
    NSLog(@"result: %d", result1);

    //2
    int multiplier = 7;
    int (^ myBlock)(int) = ^(int num) {
      return num * multiplier;
    };
  }
  return 0;
}
